﻿namespace Sidvall.FileSystemManager.UI.ViewModels.Core
{
    public abstract partial class ControlViewModelBase : Sidvall.UI.ViewModels.ControlViewModelBase
    {
        #region EntityCache

        private global::Sidvall.FileSystemManager.UI.Entities.Model.EntityCache _EntityCache;
        public global::Sidvall.FileSystemManager.UI.Entities.Model.EntityCache EntityCache
        {
            get
            {
                if (_EntityCache == null)
                    this.EntityCache = new global::Sidvall.FileSystemManager.UI.Entities.Model.EntityCache();
                return _EntityCache;
            }
            set
            {
                _EntityCache = value;
                RaisePropertyChanged(nameof(EntityCache));
            }
        }

        #endregion
        #region ResourceCollectionManager

        private global::Sidvall.FileSystemManager.Resources.ResourceCollectionManager _ResourceCollectionManager;
        public global::Sidvall.FileSystemManager.Resources.ResourceCollectionManager ResourceCollectionManager
        {
            get
            {
                if (_ResourceCollectionManager == null)
                    this.ResourceCollectionManager = new global::Sidvall.FileSystemManager.Resources.ResourceCollectionManager();
                return _ResourceCollectionManager;
            }
            set
            {
                _ResourceCollectionManager = value;
                RaisePropertyChanged(nameof(ResourceCollectionManager));
            }
        }

        #endregion

        #region OnCultureChanged

        protected override void OnCultureChanged(Sidvall.UI.Messaging.CultureMessage item)
        {
            RaisePropertyChanged(nameof(ResourceCollectionManager));
        }

        #endregion
    }
}